package com.sc.VenusQueryBeta.model.account.daikuan;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.daikuan.DaiKuanContract;
import com.sc.VenusQueryBeta.model.bean.account.AccountList;
import com.sc.VenusQueryBeta.model.bean.account.AllRoomListBean;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;

import io.reactivex.Observable;

/**
 * Created by SC-02 on 2018/9/19.
 * 场面明细model 继承Basemodel 并且实现契约累的model方法
 */

public class DaiKuanModel extends BaseModel implements DaiKuanContract.IDaiKuanModel {

    /**
     * 实例化对象
     * @return
     */
    public static DaiKuanModel newInstance(){
        return new DaiKuanModel();
    }

    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());
    }

    @Override
    public Observable<AccountList> queryZiHuList(String serverAddress, String projectName, int serverPort, int clientindex, String roomyear, String roommonth, String recognitionValue, String depositType,String currencynameCN) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").
                queryClientReserved02(clientindex,  roomyear, roommonth, recognitionValue, depositType,currencynameCN).compose(RxHelper.<AccountList>rxSchedulerHelper());
    }

//    //查询厅(根据账房那边排序)
//    @Override
//    public Observable<AllRoomListBean> queryAllRoomList(String serverAddress, String projectName, int serverPort) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryAllRoomList().compose(RxHelper.<AllRoomListBean>rxSchedulerHelper());
//
//    }

//    //查询子户口
//    @Override
//    public Observable<AccountList> queryZiHuList(String serverAddress, String projectName, int serverPort, int clientindex, int roomid, String roomyear, String roommonth, String recognitionValue, String depositType) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").
//                queryClientReserved02(clientindex, roomid, roomyear, roommonth, recognitionValue, depositType).compose(RxHelper.<AccountList>rxSchedulerHelper());
//    }

    //查询子户口
//    @Override
//    public Observable<AccountList> queryZiHuList(String serverAddress, String projectName, int serverPort, int clientindex, int roomid, String roomyear, String roommonth, String recognitionValue, String depositType) {
//        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").
//                queryClientReserved02(clientindex, roomid, roomyear, roommonth, recognitionValue, depositType).compose(RxHelper.<AccountList>rxSchedulerHelper());
//    }
}
